﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Repositories;
using Ninject;
using Timetable.Base.Interfaces.Validators;
using Timetable.Utils.Exceptions;
using Timetable.Base.Interfaces.Services.DataServices;

namespace Timetable.Data.Services.DataServices
{
    public class AuditoriumService: BaseDataService<Auditorium>
    {
        [Inject]
        public IRepository<Auditorium> AuditoriumRepository { get; set; }

        [Inject]
        public IValidator<Auditorium> AuditoriumValidator { get; set; }

        public override Base.Interfaces.Repositories.IRepository<Auditorium> Repository
        {
            get { return AuditoriumRepository; }
        }

        public override Base.Interfaces.Validators.IValidator<Auditorium> Validator
        {
            get { return AuditoriumValidator; }
        }

        public override IQueryable<Auditorium> All()
        {
            throw new NotSupportedException();
        }

        public override Auditorium GetById(int id)
        {
            return AuditoriumRepository.GetById(id);
        }
    }
}
